#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

char u_buf[100] = {0};
int main(int argc, const char *argv[])
{
    /*your code*/
    int fd;
    fd = open("/dev/mycdev", O_RDWR);
    if (fd < 0) {
        perror("open");
        return -1;
    }
    read(fd, u_buf, sizeof(u_buf));
    write(fd, u_buf, sizeof(u_buf));
    close(fd);
    return 0;
}